﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="FirstNamesAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.OpenPersonality.FirstNamesAdmin" %>
<owc:OwObjectDataSource ID="FirstNamesOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwFirstNamesEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetByDynamic" EnablePaging="True" SelectCountMethod="OwGetByDynamicCount"
    TypeName="Micronet.OpenWeb.Com.BLL.OwFirstNamesBLL" UpdateMethod="OwUpdate" EnableCaching="false">
    <SelectParameters>
        <asp:Parameter Name="isDeleted" Type="Boolean" />
        <asp:Parameter Name="languageCode" Type="String" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
<owc:OwGrid ID="FirstNamesGrid" runat="server" DataSourceID="FirstNamesOds" SkinID="OwGridAdmin"
    AutoGenerateColumns="False" CellSpacing="0" GridLines="None" OwEnableMessageDisplay="True"
    OwMessageDisplayControl="" OwMessageDisplayType="InPlace">
    <MasterTableView DataSourceID="FirstNamesOds" DataKeyNames="FirstNameID">
        <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="<%$OwR:AddNewRecordText %>"
            RefreshText="<%$ OwR:RefreshText %>"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridBoundColumn DataField="FirstNameID" FilterControlAltText="Filter column column"
                HeaderText="<%$OwR:Code %>" UniqueName="FirstNameID">
            </owct:GridBoundColumn>
            <owct:GridBoundColumn DataField="Name" FilterControlAltText="Filter column column"
                HeaderText="Name" UniqueName="column">
            </owct:GridBoundColumn>
            <%--  <owct:GridBoundColumn FilterControlAltText="Filter column2 column" HeaderText="<%$OwR:Description %>"
                DataField="Description" UniqueName="column2">
            </owct:GridBoundColumn>--%>
            <owct:GridBoundColumn DataField="Weight" FilterControlAltText="Filter column3 column"
                HeaderText="<%$OwR:Weight %>" UniqueName="column3">
            </owct:GridBoundColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$OwR:IsDeleted %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <div align="center">
                        <owc:OwCheckBox ID="IsDeletedCb" runat="server" Checked='<%#Eval("IsDeleted")%>'
                            AutoPostBack="true" Text='<%#Eval("FirstNameID")%>' CssClass="HiddenText" OnCheckedChanged="IsDeletedCb_CheckedChanged" /></div>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridBoundColumn DataField="LanguageCode" FilterControlAltText="Filter column3 column"
                HeaderText="<%$OwR:Language %>" UniqueName="column3">
            </owct:GridBoundColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$OwR:Modify %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <div align="center">
                        <a href='/Admin/Views/Site/FirstNamesEdit.aspx?Id=<%#Eval("FirstNameID")%>'>
                            <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif' runat="server"
                                id="UpdateImage" /></a>
                    </div>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$OwR:Delete %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <div align="center">
                        <asp:ImageButton CausesValidation="true" OnClientClick='if(!confirm("Are you sure to  Delete?")) return false'
                            ID="EditDeleteButton1" CommandName="Delete" runat="server" SkinID="OwConfirmButton"
                            ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" />
                    </div>
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <FormTemplate>
                <%
                    Response.Redirect("FirstNamesEdit.aspx");
                %>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </HeaderContextMenu>
</owc:OwGrid>
<owc:OwObjectDataSource ID="LanguageOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwLanguagesEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwLanguagesBLL"
    UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:Parameter Name="portalID" Type="Int64" />
        <asp:Parameter Name="languageCode" Type="String" />
        <asp:Parameter DefaultValue="" Name="isEnabled" Type="Boolean" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
